<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="java.io.*"%>
<%@ page import="requestInterFace.Handle.*"%>
<%@ page import="xml.response.*"%>
<%@ page import="xml.root"%>
<%@ page import="util.print.printLogCat"%>
<%@ page import="org.sql.table.*"%>
<%@ page import="xml.var"%>
<%@ page import="java.util.Vector"%>
<%@ page import="java.util.Enumeration"%>
<%@ page import="requestInterFace.UserInfoInterFace.*"%>
<%@ page import="jqgrid.jqgrid"%>
<%@ page import="org.util.getNewData"%>
<%@ page import="util.check"%>
<%@ include file="../../util/paramPrint.jsp" %>
<%@ page trimDirectiveWhitespaces="true" %> 
<%   

    /*********** jqgrid ******************/
		jqgrid jq=new jqgrid();
		jq.setRows(request.getParameter(jqgrid._rows));
		jq.setSord(request.getParameter(jqgrid._sord));
		jq.setSortname(request.getParameter(jqgrid._sortname));
		jq.setPage(request.getParameter(jqgrid._page));
		jq.setOper(request.getParameter(jqgrid._oper));
		jq.setSearch(request.getParameter(jqgrid._search));
		/*************************************/
		
String Task_ID = request.getParameter("Task_ID");
String Task_Content = request.getParameter("Task_Content");
String Task_EndTime = request.getParameter("Task_EndTime");
String Info =request.getParameter("Info");//产品描述
String userType=(String)session.getAttribute("User_Type");
String userID=(String)session.getAttribute("User_ID");
root root=new root();

 if(check.isNumeric(Task_ID)){
		  }else{
		    root.setStatus("false");
			root.setMsg("不是正确的ID值");
			PrintWriter pw = response.getWriter();
			pw.println(root.getXmlString());
			pw.flush();
			return ;
		   }


taskHandle handle= new taskHandle();
if(!userType.equals("1")&&!handle.isUser(userID,Task_ID)){
	    root.setStatus("false");
		root.setMsg("你没有权限");
		PrintWriter pw = response.getWriter();
		pw.println(root.getXmlString());
		pw.flush();
		return ;
}
taskinfo1_1 user=new taskinfo1_1();
		user.addequwhile("Task_ID"," = ",Task_ID);
		if(Task_Content!=null&&(!Task_Content.equals(""))){
		  
		    user.setUpdateField("Task_Content",Task_Content);
		}
		
		if(Task_EndTime!=null&&(!Task_EndTime.equals(""))){
		  
		    user.setUpdateField("Task_EndTime",Task_EndTime);
		}
		
		if(Info!=null&&(!Info.equals(""))){
		  
		    user.setUpdateField("Info",Info);
		}
		int row=user.updata();
		root.setRecords(""+row);//设置当前查询到的记录数
		if(row>0){
			root.setStatus("true");
			root.setMsg("修改成功");
		}else{
			root.setStatus("false");
			root.setMsg("修改失败");
		}
		//printLogCat.printlnWriter(root.getXmlString());
		String rep=root.getXmlString();
%>
<%=rep%>



